package com.acceptable.qucun.generic.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Component
@ConfigurationProperties(value = "qucun.redis")
public class RedisItem {

    @Value("uploaded-chunk-minutes")
    private String uploadedChunkMinutes;

    @Value("verify-code-minutes")
    private String verifyCodeMinutes;

    @Value("usage-login")
    private String usageLogin;

    @Value("usage-register")
    private String usageRegister;

    @Value("usage-change-password")
    private String usageChangePassword;

    @Value("usage-physical-delete")
    private String usagePhysicalDelete;

    @Value("usage-chunk-uploaded")
    private String usageChunkUploaded;

    public Integer getVerifyCodeMinutes(){
        return Integer.parseInt(this.verifyCodeMinutes);
    }

}
